package model.Actions;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import view.ViewFunctions;
import DB.Connection.DBConnectionManager;

import commons.Entities.LegenDate;

public class importUserLegenDatesAction implements Runnable {

	private static final Log logger = LogFactory.getLog(importUserLegenDatesAction.class);

	private Integer userID;

	public importUserLegenDatesAction(Integer userID) {
		this.userID = userID;
	}

	@Override
	public void run() {
		logger.info("importUserLegenDatesAction starting...");

		List<LegenDate> legenDates = DBConnectionManager.get().getLegenDatesByUserID(userID);
		ViewFunctions.get().updateGUIUserLegeDateDetails(legenDates);

		logger.info("importUserLegenDatesAction ended.");
	}
}
